﻿@model Pro260Website.Models.EntityViewModel<Domain.Entity.Platform>
@{
    ViewBag.Title = "Platform";
}



<div id="formBackground">
<h2 class="title @Html.GetColor(Request.Cookies["color"])">@Model.Entity.Name</h2>

    <div id="titlelessItem" class="actionButtons @Html.GetColor(Request.Cookies["color"])">
        <div class="item">
            <p>Generation @Model.Entity.Generation</p>
            <p>Year Released @Model.Entity.YearReleased</p>
            <p>Description: @Model.Entity.Description</p>
            <br /><br />
            <center>
                @{        
                    Pro260Website.Models.VideoViewModel viewModel = new Pro260Website.Models.VideoViewModel()
                        {
                            YoutubeID = Model.Entity.YoutubeLink,
                            VideoName = Model.Entity.VideoName
                        };

                    Html.RenderPartial("VideoDisplay", viewModel);
                }
            </center>
   
            <div class="actionButtons">
                <br /><br />
    
                @if (Model.Entity.Articles.Any())
                {
                    @Html.ActionLink("View News", "ViewPlatformNews", "News", new { platformId = Model.Entity.PlatformID }, null)
                }

                <div class="item">
                    @using (Html.BeginForm("AmazonSearch", "Search"))
                    {
                        <input type="hidden" name="searchItem" value="@Model.Entity.Name" />
                        <input type="submit" value="Search Amazon" class="actionButtons @Html.GetColor(Request.Cookies["color"])"/>
                    }
                    @using (Html.BeginForm("GamestopSearch", "Search"))
                    {
                        <input type="hidden" name="searchItem" value="@Model.Entity.Name" />
                        <input type="submit" value="Search Gamestop" class="actionButtons @Html.GetColor(Request.Cookies["color"])"/>
                    }
                    @using (Html.BeginForm("GoogleShoppingSearch", "Search"))
                    {
                        <input type="hidden" name="searchItem" value="@Model.Entity.Name" />
                        <input type="submit" value="Search Google Shopping" class="actionButtons @Html.GetColor(Request.Cookies["color"])"/>
                    }
                </div>
            </div>
    
        </div>
    </div>

</div>
